from flask import Blueprint, jsonify

# base = Blueprint('base', __name__, url_prefix='/base')
base = Blueprint('base', __name__)
from ..routes import *


def success(data):
    '''
    操作成功
    :param data:
    :return:
    '''
    return jsonify({
        "code": 200,
        "message": "操作成功",
        "data": data
    })


def page_success(total, data):
    '''
    分页成功
    :param data:
    :return:
    '''
    return jsonify({
        "code": 200,
        "total": total,
        "message": "操作成功",
        "data": data
    })
